Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add createDefaultMetadataKeyInterceptor #2368

Merged
merged 10 commits into from
Oct 16, 2024

Conversation

BlinkyStitt
Copy link
Contributor

@BlinkyStitt BlinkyStitt commented Oct 15, 2024

Why is this change needed?

Neynar requires x-api-key to access its hubs. This change makes it easy to include that (or any other) header.

I tried to follow the docs to create a changes, but got an error. Am I running it from the wrong directory maybe?

% yarn changeset
yarn run v1.22.22
error Command "changeset" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
bryan@Bryan-Neynar hub-monorepo % yarn run changeset 
yarn run v1.22.22
error Command "changeset" not found.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Merge Checklist

Choose all relevant options below by adding an x now or at any time before submitting for review


PR-Codex overview

This PR introduces a new function to create a metadata key interceptor for gRPC calls in the hub-nodejs package.

Detailed summary

  • Added the createDefaultMetadataKeyInterceptor function in packages/hub-nodejs/src/client.ts.
  • The function takes a key and value, returning an interceptor that sets the specified metadata key with the given value if it is not already present.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

changeset-bot bot commented Oct 15, 2024

🦋 Changeset detected

Latest commit: 51790ca

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@farcaster/hub-nodejs Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Oct 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hub-monorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 16, 2024 3:42am

auto-merge was automatically disabled October 16, 2024 00:15

Head branch was pushed to by a user without write access

@BlinkyStitt
Copy link
Contributor Author

I don't see how that test failure could be caused by my change. This function isn't even used.

@sanjayprabhu sanjayprabhu enabled auto-merge (squash) October 16, 2024 18:03
Copy link

codecov bot commented Oct 16, 2024

Codecov Report

Attention: Patch coverage is 0% with 8 lines in your changes missing coverage. Please review.

Project coverage is 44.16%. Comparing base (1880070) to head (51790ca).
Report is 401 commits behind head on main.

Files with missing lines Patch % Lines
packages/hub-nodejs/src/client.ts 0.00% 7 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2368       +/-   ##
===========================================
- Coverage   74.05%   44.16%   -29.90%     
===========================================
  Files          99      146       +47     
  Lines        9425    26203    +16778     
  Branches     2097     9272     +7175     
===========================================
+ Hits         6980    11572     +4592     
- Misses       2327    12815    +10488     
- Partials      118     1816     +1698     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sanjayprabhu sanjayprabhu merged commit 91b7720 into farcasterxyz:main Oct 16, 2024
8 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants